<template>
  <div>

    <McParentChildGrandsonSelect :p-model.sync="form.pid" :c-model.sync="form.cid" v-model="form.id" 
    :mc-parent-config="{'api':{'method':'post','url':'magical_lowcode/openapi/crud/parent/list','params':[],'fields':[],'limit':10},'pkField':'id','pkTextField':'pname'}" 
    :mc-child-config="{'api':{'method':'post','url':'magical_lowcode/openapi/crud/child/list','params':[],'fields':[],'limit':10},'pkField':'id','pkTextField':'cname','parentField':'parentId'}" 
    :mc-grandson-config="{'api':{'method':'post','url':'magical_lowcode/openapi/crud/grandson/list','params':[],'fields':[],'limit':10},'pkField':'id','pkTextField':'gname','parentField':'childId'}" 
    />
    

    <el-button @click="print">打印</el-button>
    <el-button @click="change">改变</el-button>
    <el-button @click="hideshow">现因</el-button>
  </div>
</template>

<script>
import McParentChildGrandsonSelect from './components/McParentChildGrandsonSelect'
export default {
  data(){
    return {
      show:true,
      form: {pid:"",cid:"",id:""},
    }
  },
  components:{
    McParentChildGrandsonSelect
  },
  methods:{
      print(){
          console.log(this.form)
      },
      change(){
        // this.$set(this.form,"id","2c9fe31d7ca07ec7017ca081ed540008")
        this.form.id="2c9fe31d7ca07ec7017ca081ed540008";
      },
      hideshow(){
          this.show = !this.show;
      }
  }
}
</script>

<style>

</style>
